1. Technical Field
The present invention relates to a technique for smoothing an image through filtering.
2. Related Art
A technique called the dither method is a method for expressing gradation. This dither method is a technique that simulates more gradation by dispersing pixels of plural differing densities to appropriate positions. For example, an image that appears gray (half-tone) overall can be expressed by alternately disposing white pixels and black pixels. By adjusting the number, position, and the like of these white pixels and black pixels, it is possible to continuously express a gradation from white to black.
For example, JP-A-3-105484 and JP-A-6-180568 disclose techniques for smoothing an image through filtering when enlarging or reducing an image in which gradation is expressed through the dither method (called a “dithered image” hereinafter). “Smoothing” is a process in which the contours (edges) of an image are smoothed by reducing the difference in densities between pixels that are adjacent to one another. When an image is enlarged or reduced, there are cases where the contours of the image are accentuated, and thus it is necessary to blur the accentuated contours by performing this smoothing on the image.
There is a problem, however, that the amount of processing for filtering and smoothing a dithered image is very large; when this processing is implemented by software, the processing time and amount of energy consumed is extremely high. Accordingly, when desiring to speed up the processing time in particular, a dedicated hardware filter for filtering may be used. However, there is a problem that while hardware filters are capable of high-speed processing, they use multipliers and dividers that have comparatively higher prices, resulting in high production costs as well as high energy consumption.
Incidentally, when filtering a dithered image in order to smooth the image, there are cases where stages appear in the gradation expressed through the dither method, and so-called “pseudo-contours” arise. For example, as shown in FIG. 9, image data “010”, where white pixels are expressed by “0” and black pixels are expressed by “1”, is filtered by a three-tap filter configured with a filter coefficient of 2:3:2. In this case, the result of filtering performed on the black pixel “1”, which is the target pixel, is (0×2+1×3+0×2)÷(2+3+2)=3÷7=0.428. Here, assuming the density of the pixel is found by rounding off the calculation result to the nearest whole number, the density of the black pixel “1” becomes “0” in the example of FIG. 9. Accordingly, due to the filtering, an area that is originally expressed as a light gray changes to an area expressed as white, and the gradation is lost. When occurring in an area in which the gradation continuously changes, this phenomenon is a cause of pseudo-contours.